<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 数组是按次序排列的一组值，每个值的位置(下标)都有编号（从0开始），整个数组用方括号表示。 -->
     <script>
        var array = ['da', 'jia','hao','wo','shi','gao','wei','jie',]
        console.log(array);
    //    可以先定义后进行赋值
        var num = []
        num[0] = '1';
        num[1] = '2';
        num[2] = '3';
        num[3] = 4;
        console.log(num);
     //数组中可嵌套数组：多维数组。
        var index = ['x','y',[1,2,3]]
        console.log(index);
      //下表可以进行赋值也可以读取
      var user = ['iwen','bob','gwj']
      console.log(user[2]);
       //下表越界输出结果为undefined    
     </script>
</body>
</html>